package com.jf.blog_jf04.utils;

import com.alibaba.fastjson.JSON;

import java.util.List;

public class BeanConvertUtils {
    public static <S, T> T copyBean(S s, Class<T> tClass) {
        return JSON.parseObject(JSON.toJSONString(s), tClass);
    }

    public static <S, T> List<T> coptList(List<S> sList, Class<T> tClass) {
        return JSON.parseArray(JSON.toJSONString(sList), tClass);
    }

}
